//医院设置信息数据类型
export interface SettingItemType {
  id: number
  createTime: string
  updateTime: string
  isDeleted: number
  param?: {}
  hosname: string
  hoscode: string
  apiUrl: string
  signKey: string
  contactsName: string
  contactsPhone: string
  status: number
}
export type SettingListType = SettingItemType[]

// 医院设置列表数据类型
export interface HospitalSetType {
  records: SettingListType
  total: number
  size?: number
  current: number
  orders?: []
  hitCount?: boolean
  searchCount?: boolean
  pages: number
}

// 医院列表每一项数据类型
export interface HosContentItemType {
  id: string
  createTime: string
  updateTime: string
  isDeleted: number
  param: {
    hostypeString: string
    fullAddress: string
  }
  hoscode: string
  hosname: string
  hostype: string
  provinceCode: string
  cityCode: string
  districtCode: string
  address: string
  logoData: string
  intro: string
  status: 1 | 0
  bookingRule: {
    cycle: number
    releaseTime: string
    stopTime: string
    quitDay: number
    quitTime: string
    rule?: string[]
  }
}
export type HosContentListType = HosContentItemType[]

// 医院列表数据类型
export interface HosListType {
  content: HosContentListType
  pageable: {
    sort: {
      sorted: boolean
      unsorted: boolean
      empty: boolean
    }
    pageNumber: number
    pageSize: number
    offset: number
    unpaged: boolean
    paged: boolean
  }
  totalPages: number
  last: boolean
  totalElements: number
  first: boolean
  sort: {
    sorted: boolean
    unsorted: boolean
    empty: boolean
  }
  numberOfElements: number
  size: number
  number: number
  empty: boolean
}

// 获取医院列表参数类型
export interface HospitalListParamsType {
  page: number // 当前页码
  limit: number // 每页条数

  provinceCode?: string // 省编码
  cityCode?: string // 市编码
  districtCode?: string // 区编码
  hoscode?: string // 医院编码
  hosname?: string // 医院名称
  hostype?: string // 医院类型
  status?: 0 | 1 // 状态：0：未上线 1：已上线
}

// 新增医院设置
export interface AddHosSetType {
  apiUrl: string
  contactsName: string
  contactsPhone: string
  createTime?: string
  hoscode: string
  hosname: string
  id?: number | null
  isDeleted?: 0 | 1
  param?: {}
  signKey?: string
  status?: 0 | 1
  updateTime?: string
}

// 获取医院详情
export interface HospitalDetailType {
  bookingRule: {
    cycle: number|null
    releaseTime: string
    stopTime: string
    quitDay: -1
    quitTime: string
    rule: string[]
  }
  hospital: {
    id: string
    createTime: string
    updateTime: string
    isDeleted: 0 | 1
    param: {
      hostypeString: string
      fullAddress: string
    }
    hoscode: string
    hosname: string
    hostype: string
    provinceCode: string
    cityCode: string
    districtCode: string
    address: string
    logoData: string
    intro: string
    route: string
    status: 0 | 1
    bookingRule: null
  }
}
